//更多JS请加入酷9更新群424765458
function main(item) {
  let url = item.url;
  let id = ku9.getQuery( url,  "id" );
  
  const jsonUrl = 'https://mapi.yqrtv.com/api/v1/channel.php';
  const headers = {};   
  let urlData =  ku9.get(jsonUrl, JSON.stringify(headers));
  let regex = new RegExp('"id":' + id + ',.*?"m3u8":"(.*?)"', 'i');
  let match = urlData.match(regex); 
  let finalUrl = match[1].replace(/\\/g, '');
  return JSON.stringify({ url: finalUrl }); 
}
